﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="UCenter.Web.Views.Account.Login" %>

<asp:content id="loginContent" contentplaceholderid="MainContent" runat="server">

    <script type="text/javascript">
        $(document).ready(function(){
            $("#form_login").validate( {
                rules: {
                    Email: {
                        required: true,
                        email: true
                    },
                    Password: {
                        required: true,
                        minlength: 8
                    }
                },
                messages: {
                    Email: {
                        required: "Email地址不能为空",
                        email: "Email地址输入格式不正确"
                    },
                    Password: {
                        required: "密码不能为空",
                        minlength: "密码长度最小为8位"
                    }
                }  
            });
        });  
    </script>

	<div class="form1">
		<h3>登录</h3>
		<form id="form_login" method="post" action="<%= Html.AttributeEncode(Url.Action("Login","Account")) %>">
			<%
				if(ViewData["MsgInfo"] != null && !string.IsNullOrEmpty(ViewData["MsgInfo"].ToString()))
				{
			%>
			<div class="message">
				<%= Html.Encode(ViewData["MsgInfo"])%>
			</div>
			<%
				} 
			%>
			<p>
				<label for="email">你的Email地址：</label>
				<%= Html.TextBox("Email","",new { @class = "f-text" }) %>
				<%=Html.ValidationMessage("Email")%>
			</p>
			<p>
				<label for="password">你的密码：</label>
				<%= Html.Password("Password","", new { @class = "f-text" })%>
				<%=Html.ValidationMessage("Password")%>
			</p>
			<p><label class="f-check"><%= Html.CheckBox("rememberMe")%>下次自动登录</label></p>
			<p><%= Html.SubmitButton("submit_Login", "登录", new { @class = "f-button" })%></p>
		</form>
	</div>
</asp:content>